/*     */ package com.umeng.update;
/*     */ 
/*     */ import android.app.Dialog;
/*     */ import android.content.Context;
/*     */ import android.view.LayoutInflater;
/*     */ import android.view.View;
/*     */ import android.widget.TextView;
/*     */ import com.umeng.common.b;
/*     */ import com.umeng.common.c;
/*     */ import com.umeng.common.net.a;
/*     */ import com.umeng.common.net.l;
/*     */ 
/*     */ public class f
/*     */   implements l
/*     */ {
/*     */   private final String a;
/*     */   private final String b;
/*  26 */   private UmengDownloadListener c = null;
/*     */ 
/*  28 */   private String d = null;
/*  29 */   private String e = null;
/*  30 */   private String f = null;
/*  31 */   private String g = null;
/*     */ 
/*  33 */   private Context h = null;
/*  34 */   private String i = null;
/*     */ 
/*  36 */   private a j = null;
/*  37 */   private boolean k = false;
/*     */ 
/*     */   public f() {
/*  40 */     this.a = "delta_update";
/*  41 */     this.b = "update_normal";
/*     */   }
/*     */ 
/*     */   public void a(Context paramContext, String paramString1, String paramString2, String paramString3, String paramString4, UmengDownloadListener paramUmengDownloadListener)
/*     */   {
/*  46 */     this.h = paramContext;
/*  47 */     this.i = b.w(paramContext);
/*     */ 
/*  49 */     this.d = paramString1;
/*  50 */     this.e = paramString2;
/*     */ 
/*  52 */     this.f = paramString3;
/*  53 */     this.g = paramString4;
/*     */ 
/*  55 */     this.c = paramUmengDownloadListener;
/*     */   }
/*     */ 
/*     */   public boolean b() {
/*  59 */     return this.k;
/*     */   }
/*     */ 
/*     */   public void c()
/*     */   {
/*  66 */     this.j = new a(this.h, this.a, this.i, this.f, this);
/*     */ 
/*  68 */     this.j.a(this.g);
/*  69 */     this.j.b(this.e);
/*  70 */     this.j.a();
/*     */   }
/*     */ 
/*     */   public void d()
/*     */   {
/*  77 */     this.j = new a(this.h, this.b, this.i, this.d, this);
/*     */ 
/*  79 */     this.j.a(this.e);
/*  80 */     this.j.b(this.e);
/*  81 */     this.j.a();
/*     */   }
/*     */ 
/*     */   public void a()
/*     */   {
/*  86 */     this.k = true;
/*  87 */     if (this.c != null)
/*  88 */       this.c.OnDownloadStart();
/*     */   }
/*     */ 
/*     */   public void a(int paramInt)
/*     */   {
/*  94 */     if (this.c != null)
/*  95 */       this.c.OnDownloadUpdate(paramInt);
/*     */   }
/*     */ 
/*     */   public void a(int paramInt1, int paramInt2, String paramString)
/*     */   {
/* 101 */     switch (paramInt1) {
/*     */     case 0:
/*     */     case 1:
/* 104 */       break;
/*     */     case 3:
/* 106 */       d();
/* 107 */       break;
/*     */     case 2:
/*     */     }
/*     */ 
/* 112 */     this.k = false;
/* 113 */     if (this.c != null)
/* 114 */       this.c.OnDownloadEnd(paramInt1, paramString);
/*     */   }
/*     */ 
/*     */   public void b(int paramInt)
/*     */   {
/* 120 */     switch (paramInt) {
/*     */     case 2:
/* 122 */       this.k = true;
/* 123 */       break;
/*     */     }
/*     */   }
/*     */ 
/*     */   public Dialog a(Context paramContext, String paramString, boolean paramBoolean, UmengDialogButtonListener paramUmengDialogButtonListener)
/*     */   {
/* 138 */     int m = c.a(paramContext).e("umeng_update_dialog");
/* 139 */     int n = c.a(paramContext).c("umeng_update_content");
/* 140 */     int i1 = c.a(paramContext).c("umeng_update_wifi_indicator");
/*     */ 
/* 142 */     int i2 = c.a(paramContext).c("umeng_update_id_ok");
/* 143 */     int i3 = c.a(paramContext).c("umeng_update_id_cancel");
/* 144 */     int i4 = c.a(paramContext).c("umeng_update_id_ignore");
/* 145 */     int i5 = c.a(paramContext).c("umeng_update_id_close");
/*     */ 
/* 147 */     int[] arrayOfInt = { 6 };
/*     */ 
/* 149 */     Dialog localDialog = new Dialog(paramContext, 16973840);
/* 150 */     View localView = LayoutInflater.from(paramContext).inflate(m, null);
/*     */ 
/* 152 */     g localg = new g(this, i2, arrayOfInt, i4, localDialog);
/*     */ 
/* 166 */     if (i1 > 0) {
/* 167 */       int i6 = (b.l(paramContext)) || (paramBoolean) ? 8 : 0;
/* 168 */       localView.findViewById(i1).setVisibility(i6);
/*     */     }
/*     */ 
/* 171 */     localDialog.setOnDismissListener(new h(this, paramUmengDialogButtonListener, arrayOfInt));
/*     */ 
/* 178 */     localView.findViewById(i2).setOnClickListener(localg);
/* 179 */     localView.findViewById(i3).setOnClickListener(localg);
/* 180 */     localView.findViewById(i4).setOnClickListener(localg);
/* 181 */     localView.findViewById(i5).setOnClickListener(localg);
/*     */ 
/* 185 */     TextView localTextView = (TextView)localView.findViewById(n);
/* 186 */     localTextView.requestFocus();
/* 187 */     localTextView.setText(paramString);
/*     */ 
/* 189 */     localDialog.setContentView(localView);
/*     */ 
/* 191 */     return localDialog;
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.update.f
 * JD-Core Version:    0.6.2
 */